package com.ruoyi.system.dic;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.apache.commons.lang3.StringUtils;


@Getter
@AllArgsConstructor
public enum SexEnum {
    SEX_NO("2", "未知"),
    SEX_MAN("0", "男"),
    SEX_WOMAN("1", "女");

    public String code;

    public String msg;

    public static String getByCode(String code) {
        for (SexEnum temp : values()) {
            if (StringUtils.equals(temp.code, code)) {
                return temp.getMsg();
            }
        }
        return null;
    }

}
